/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package spaceshooter;

import it.randomtower.engine.ResourceManager;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

/**
 *
 * @author Bensch
 */
public class Spaceshooter extends StateBasedGame {
    public static int GAME_STATE = 1;
    
    public Spaceshooter(String title) {
        super(title);
        
    }
    
    @Override
    public void initStatesList(GameContainer gc) throws SlickException {
        try {
            ResourceManager.loadResources("data/resources.xml");
        } catch (IOException ex) {
            Logger.getLogger(Spaceshooter.class.getName()).log(Level.SEVERE, null, ex);
        }
        addState(new GameWorld(GAME_STATE,gc));
        enterState(GAME_STATE);
    }
    
    public static void main(String[] args) throws SlickException {
        AppGameContainer app = new AppGameContainer(new Spaceshooter("Space Shooter"));
        
        app.setDisplayMode(600, 600, false); // false -> Fullscreen
        app.setTargetFrameRate(60);
        app.start();
    }
}
